package com.wn.cl.park.model.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author yellow docker
 * @since 2025-03-11
 */
@Getter
@Setter
  @ApiModel(value = "Payments对象", description = "")
public class Payments implements Serializable {

    private static final long serialVersionUID = 1L;

      @TableId
      private Long id;

      @ApiModelProperty("关联的预订ID")
      private Long reservationId;

      //唯一的支付号
      private String paymentNumber;

      @ApiModelProperty("支付金额")
      private BigDecimal amount;

      @ApiModelProperty("支付方式")
      private String paymentMethod;

      @ApiModelProperty("交易ID（来自支付网关）")
      private String transactionId;

      @ApiModelProperty("支付状态：0支付中，1成功，2失败,3超时未支付")
      private Integer paymentStatus;

      @ApiModelProperty("创建时间")
      @TableField(fill = FieldFill.INSERT)  //在插入操作的时候填充
      private LocalDateTime createdAt;

      @ApiModelProperty("更新时间")
      @TableField(fill = FieldFill.INSERT_UPDATE)  //在插入和更新时填充
      private LocalDateTime updatedAt;


}
